namespace ghost {
	/**游戏没用这个类*/
	export class CircleLight extends GYSprite implements IPoolObject{
		public static show(pr:GYSprite, toX:number=0,toY:number=0,index:number=-1,w:number=NaN,h:number=NaN):void
		{
			PoolUtil.registerClassInfo(CircleLight,"ghost.CircleLight");
			let light:CircleLight = <CircleLight>PoolUtil.fromPool(CircleLight);
			light.show(pr,toX,toY,index,w,h);
		}
		public img:GYSprite;
		public constructor() {
			super();
			let s= this;
			s.texture = Main.instance.getRes(Conf.skillAlias + "light.png");
			s.pivotX = s.texture.sourceWidth >> 1;
			s.pivotY = s.texture.sourceHeight >> 1;
		}
		public show(pr:GYSprite, toX:number=0,toY:number=0,index:number=-1,w:number=NaN,h:number=NaN):void
		{
			let s= this;
			if(index > -1)
				pr.addChildAt(s,index);
			else
				pr.addChild(s);
			s.x = toX;
			s.y = toY;
			s.width = w;
			s.height = h;
			Laya.Tween.to(s,{alpha:0,width:s.width*1.4,height:s.height*1.4},200,Laya.Ease.linearNone,Laya.Handler.create(s,function(tar:any):void{
				PoolUtil.toPool(s, CircleLight);
			}));
		}
				
		public clear(): void
		{			
			let s= this;
			if(s.inPool)return;
			if(s.parent)
				(<GYSprite>s.parent).removeChild(s);
		}
        public inPool: boolean;
        public outPoolInit(): void{
			let s= this;
			s.scaleX = s.scaleY = s.alpha = 1;
			s.height = s.width = NaN;			
		}
        public dispose(): void
		{
			let s= this;
			s.texture = null;
		}
	}
}